home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / VBSamples / DirectShow / Editing / DexterVB / frmComp.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-10-08  |  11.3 KB  |  281 lines

  1. VERSION 5.00
  2. Begin VB.Form frmComp 
  3.    Caption         =   "Composite Menu"
  4.    ClientHeight    =   2505
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5790
  8.    Icon            =   "frmComp.frx":0000
  9.    LinkTopic       =   "Form2"
  10.    LockControls    =   -1  'True
  11.    ScaleHeight     =   2505
  12.    ScaleWidth      =   5790
  13.    StartUpPosition =   1  'CenterOwner
  14.    Begin VB.Frame fraFixture 
  15.       Height          =   1965
  16.       Left            =   75
  17.       TabIndex        =   5
  18.       Top             =   0
  19.       Width           =   5640
  20.       Begin VB.TextBox txtPriority 
  21.          BeginProperty DataFormat 
  22.             Type            =   1
  23.             Format          =   "0"
  24.             HaveTrueFalseNull=   0
  25.             FirstDayOfWeek  =   0
  26.             FirstWeekOfYear =   0
  27.             LCID            =   1033
  28.             SubFormatType   =   1
  29.          EndProperty
  30.          Height          =   375
  31.          Left            =   1470
  32.          TabIndex        =   0
  33.          Top             =   300
  34.          Width           =   3975
  35.       End
  36.       Begin VB.TextBox txtStartTime 
  37.          BeginProperty DataFormat 
  38.             Type            =   1
  39.             Format          =   "0"
  40.             HaveTrueFalseNull=   0
  41.             FirstDayOfWeek  =   0
  42.             FirstWeekOfYear =   0
  43.             LCID            =   1033
  44.             SubFormatType   =   1
  45.          EndProperty
  46.          Height          =   375
  47.          Left            =   1470
  48.          TabIndex        =   1
  49.          Top             =   780
  50.          Width           =   3975
  51.       End
  52.       Begin VB.TextBox txtStopTime 
  53.          BeginProperty DataFormat 
  54.             Type            =   1
  55.             Format          =   "0"
  56.             HaveTrueFalseNull=   0
  57.             FirstDayOfWeek  =   0
  58.             FirstWeekOfYear =   0
  59.             LCID            =   1033
  60.             SubFormatType   =   1
  61.          EndProperty
  62.          Height          =   375
  63.          Left            =   1470
  64.          TabIndex        =   2
  65.          Top             =   1260
  66.          Width           =   3975
  67.       End
  68.       Begin VB.Label lblPriority 
  69.          Caption         =   "Priority"
  70.          Height          =   255
  71.          Left            =   150
  72.          TabIndex        =   8
  73.          Top             =   420
  74.          Width           =   1095
  75.       End
  76.       Begin VB.Label lblStart 
  77.          Caption         =   "Start"
  78.          Height          =   255
  79.          Left            =   150
  80.          TabIndex        =   7
  81.          Top             =   900
  82.          Width           =   1095
  83.       End
  84.       Begin VB.Label lblStop 
  85.          Caption         =   "Stop"
  86.          Height          =   255
  87.          Left            =   150
  88.          TabIndex        =   6
  89.          Top             =   1380
  90.          Width           =   615
  91.       End
  92.    End
  93.    Begin VB.CommandButton cmdOk 
  94.       Caption         =   "OK"
  95.       Default         =   -1  'True
  96.       Height          =   340
  97.       Left            =   3270
  98.       TabIndex        =   3
  99.       Top             =   2070
  100.       Width           =   1095
  101.    End
  102.    Begin VB.CommandButton cmdCancel 
  103.       Caption         =   "Cancel"
  104.       Height          =   340
  105.       Left            =   4470
  106.       TabIndex        =   4
  107.       Top             =   2070
  108.       Width           =   1215
  109.    End
  110. Attribute VB_Name = "frmComp"
  111. Attribute VB_GlobalNameSpace = False
  112. Attribute VB_Creatable = False
  113. Attribute VB_PredeclaredId = True
  114. Attribute VB_Exposed = False
  115. '*******************************************************************************
  116. '*       This is a part of the Microsoft DXSDK Code Samples.
  117. '*       Copyright (C) 1999-2001 Microsoft Corporation.
  118. '*       All rights reserved.
  119. '*       This source code is only intended as a supplement to
  120. '*       Microsoft Development Tools and/or SDK documentation.
  121. '*       See these sources for detailed information regarding the
  122. '*       Microsoft samples programs.
  123. '*******************************************************************************
  124. Option Explicit
  125. Option Base 0
  126. Option Compare Text
  127. Private m_intUnloadMode As Integer
  128. Private Const DIALOG_TITLE = "Composition Help"
  129. ' **************************************************************************************************************************************
  130. ' * PUBLIC INTERFACE- PROPERTIES
  131.             ' ******************************************************************************************************************************
  132.             ' * procedure name: UnloadMode
  133.             ' * procedure description:  Returns an integer specifying the method from which this dialog was last unloaded
  134.             ' *
  135.             ' ******************************************************************************************************************************
  136.             Public Property Get UnloadMode() As Integer
  137.             On Local Error GoTo ErrLine
  138.             'return the value to the client
  139.             UnloadMode = m_intUnloadMode
  140.             Exit Property
  141.             
  142. ErrLine:
  143.             Err.Clear
  144.             Exit Property
  145.             End Property
  146.             
  147.             
  148. ' **************************************************************************************************************************************
  149. ' * PRIVATE INTERFACE- FORM EVENT HANDLERS
  150.             ' ******************************************************************************************************************************
  151.             ' * procedure name: Form_Load
  152.             ' * procedure description:  Occurs when a form is loaded.
  153.             ' *
  154.             ' ******************************************************************************************************************************
  155.             Private Sub Form_Load()
  156.             On Local Error GoTo ErrLine
  157.              'set default value(s)
  158.             With Me
  159.                 .txtPriority.Text = vbNullString
  160.                 .txtStartTime.Text = vbNullString
  161.                 .txtStopTime.Text = vbNullString
  162.             End With
  163.             Exit Sub
  164.             
  165. ErrLine:
  166.             Err.Clear
  167.             Exit Sub
  168.             End Sub
  169.             
  170.             
  171.             ' ******************************************************************************************************************************
  172.             ' * procedure name: Form_QueryUnload
  173.             ' * procedure description:  Occurs before a form or application closes.
  174.             ' *
  175.             ' ******************************************************************************************************************************
  176.             Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  177.             On Local Error GoTo ErrLine
  178.             
  179.             Select Case UnloadMode
  180.                 Case vbFormControlMenu
  181.                          '0 The user chose the Close command from the Control menu on the form.
  182.                          Cancel = 1: Me.Visible = False
  183.                 Case vbFormCode
  184.                          '1 The Unload statement is invoked from code.
  185.                 Case vbAppWindows
  186.                          '2 The current Microsoft Windows operating environment session is ending.
  187.                 Case vbAppTaskManager
  188.                          '3 The Microsoft Windows Task Manager is closing the application.
  189.                          End
  190.                 Case vbFormMDIForm
  191.                          '4 An MDI child form is closing because the MDI form is closing.
  192.                 Case vbFormOwner
  193.                          '5 A form is closing because its owner is closing
  194.             End Select
  195.             Exit Sub
  196.             
  197. ErrLine:
  198.             Err.Clear
  199.             Exit Sub
  200.             End Sub
  201.             
  202.             
  203.             ' ******************************************************************************************************************************
  204.             ' * procedure name: Form_Unload
  205.             ' * procedure description:  Occurs when a form is about to be removed from the screen.
  206.             ' *
  207.             ' ******************************************************************************************************************************
  208.             Private Sub Form_Unload(Cancel As Integer)
  209.             On Local Error GoTo ErrLine
  210.             With Me
  211.                .Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
  212.             End With
  213.             Exit Sub
  214.             
  215. ErrLine:
  216.             Err.Clear
  217.             Exit Sub
  218.             End Sub
  219.             
  220. ' **************************************************************************************************************************************
  221. ' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
  222.             ' ******************************************************************************************************************************
  223.             ' * procedure name: cmdOK_Click
  224.             ' * procedure description:  occures when the user clicks the 'Ok' command button
  225.             ' *
  226.             ' ******************************************************************************************************************************
  227.             Private Sub cmdOk_Click()
  228.             Dim nResultant As VbMsgBoxResult
  229.             On Local Error GoTo ErrLine
  230.             
  231.             'validation code
  232.             If frmComp.txtPriority.Text = vbNullString Then
  233.                 nResultant = MsgBox("You Must Set Priority", , DIALOG_TITLE)
  234.                 frmComp.txtPriority.SetFocus
  235.                 Exit Sub
  236.             End If
  237.             If frmComp.txtStartTime.Text = vbNullString Then
  238.                 nResultant = MsgBox("You Must Set Start", , DIALOG_TITLE)
  239.                 frmComp.txtStartTime.SetFocus
  240.                 Exit Sub
  241.             End If
  242.             If frmComp.txtStopTime.Text = vbNullString Then
  243.                 nResultant = MsgBox("You Must Set Stop", , DIALOG_TITLE)
  244.                 frmComp.txtStopTime.SetFocus
  245.                 Exit Sub
  246.             End If
  247.             If IsNumeric(frmComp.txtStartTime.Text) And IsNumeric(frmComp.txtStopTime.Text) Then
  248.                If CLng(frmComp.txtStartTime.Text) > CLng(frmComp.txtStopTime.Text) Then
  249.                    nResultant = MsgBox("Start Must Be Lower Than Stop", , DIALOG_TITLE)
  250.                    frmComp.txtStartTime.SetFocus
  251.                    Exit Sub
  252.                End If
  253.             End If
  254.             
  255.             'hide the dialog
  256.             Me.Visible = False
  257.             Exit Sub
  258.             
  259. ErrLine:
  260.             Err.Clear
  261.             Exit Sub
  262.             End Sub
  263.             
  264.             
  265.             ' ******************************************************************************************************************************
  266.             ' * procedure name: cmdCancel_Click
  267.             ' * procedure description:  occures when the user clicks the 'Cancel' command button
  268.             ' *
  269.             ' ******************************************************************************************************************************
  270.             Private Sub cmdCancel_Click()
  271.             On Local Error GoTo ErrLine
  272.             'hide the dialog
  273.             Me.Visible = False
  274.             m_intUnloadMode = 1
  275.             Exit Sub
  276.             
  277. ErrLine:
  278.             Err.Clear
  279.             Exit Sub
  280.             End Sub
  281.